webpackJsonp([57],{

/***/ "fhhr":
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ "h1zh":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/regenerator/index.js
var regenerator = __webpack_require__("lC5x");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/promise.js
var promise = __webpack_require__("rVsN");
var promise_default = /*#__PURE__*/__webpack_require__.n(promise);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__("KH7x");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("J0Oq");
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);

// EXTERNAL MODULE: ./src/common/api/commonApi.js
var commonApi = __webpack_require__("+/+p");

// EXTERNAL MODULE: ./src/common/utils/index.js
var utils = __webpack_require__("dh3M");

// CONCATENATED MODULE: ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=script&index=0!./src/apps/special-work/detail.vue




//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//



/* harmony default export */ var detail = ({
  data: function data() {
    return {
      form: {
        ticket_file: []
      },
      item: {},
      fileList: [],
      uploadFile: function uploadFile(file) {
        return commonApi["a" /* commonApi */].uploadFile(file).then(function (_ref) {
          var _name = _ref._name,
              _url = _ref._url;
          return { name: _name, url: _url };
        });
      }
    };
  },
  activated: function activated() {
    this.getData();
  },

  methods: {
    getData: function getData() {
      var _this = this;

      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
        var p, _ref2, _ref3, item, workTypeDic, entList;

        return regenerator_default.a.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                p = [commonApi["a" /* commonApi */].searchById('spe_tickets_manager', _this.$route.query.objectId), commonApi["a" /* commonApi */].dictionary('work_type'), commonApi["a" /* commonApi */].search('ent_enterprise')];
                _context.next = 3;
                return promise_default.a.all(p);

              case 3:
                _ref2 = _context.sent;
                _ref3 = slicedToArray_default()(_ref2, 3);
                item = _ref3[0];
                workTypeDic = _ref3[1];
                entList = _ref3[2];

                item.ticket_file = item.ticket_file ? item.ticket_file : [];
                item.ticket_vedio = item.ticket_vedio ? item.ticket_vedio : [];
                _this.item = Object(utils["d" /* ReplaceDictionary */])(item, {
                  work_type: workTypeDic,
                  "req_departName:EnterpriseName:id": entList
                });

              case 11:
              case 'end':
                return _context.stop();
            }
          }
        }, _callee, _this);
      }))();
    },
    onSubmit: function onSubmit() {
      var _this2 = this;

      commonApi["a" /* commonApi */].save('spe_tickets_manager', { ticket_file: this.item.ticket_file, ticket_vedio: this.item.ticket_vedio, objectId: this.item.id }).then(function () {
        _this2.$Toast('操作成功！', 'success');
      }).catch(function () {
        _this2.$Toast('操作失败！', 'error');
      });
    }
  }
});
// CONCATENATED MODULE: ./node_modules/_vue-loader@13.7.3@vue-loader/lib/template-compiler?{"id":"data-v-2796c04e","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=template&index=0!./src/apps/special-work/detail.vue
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('yt-page',{attrs:{"title":"作业详情","scroll":""}},[_c('yt-form',[_c('yt-card',{attrs:{"title":"票证信息"}},[_c('yt-cell',{attrs:{"label":"作业票证号","value":_vm.item.ticket_number}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"申请单位","value":_vm.item.req_departName}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"申请部门","value":_vm.item.department_name}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"作业类别","labelWidth":"120px","value":_vm.item.work_type}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"申请日期","labelWidth":"120px","value":_vm.item.req_date}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"作业开始时间","labelWidth":"120px","value":_vm.item.start_time}}),_vm._v(" "),_c('yt-cell',{attrs:{"border":"none","label":"作业结束时间","labelWidth":"120px","value":_vm.item.end_time}})],1),_vm._v(" "),_c('yt-card',{attrs:{"title":"人员信息"}},[_c('yt-cell',{attrs:{"label":"作业负责人","value":_vm.item.work_principal}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"作业负责人电话","labelWidth":"120px","value":_vm.item.principal_tel}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"作业监护人","labelWidth":"120px","value":_vm.item.work_guardian}}),_vm._v(" "),_c('yt-cell',{attrs:{"border":"none","label":"作业监护人电话","labelWidth":"120px","value":_vm.item.guardian_tel}})],1),_vm._v(" "),_c('yt-card',{attrs:{"title":"上传照片"}},[(_vm.item.ticket_file)?_c('yt-file',{attrs:{"uploadFile":_vm.uploadFile},model:{value:(_vm.item.ticket_file),callback:function ($$v) {_vm.$set(_vm.item, "ticket_file", $$v)},expression:"item.ticket_file"}}):_vm._e()],1),_vm._v(" "),_c('yt-card',{attrs:{"title":"上传视频"}},[(_vm.item.ticket_file)?_c('yt-file',{attrs:{"uploadFile":_vm.uploadFile},model:{value:(_vm.item.ticket_vedio),callback:function ($$v) {_vm.$set(_vm.item, "ticket_vedio", $$v)},expression:"item.ticket_vedio"}}):_vm._e()],1),_vm._v(" "),_c('yt-btn',{staticClass:"btn",attrs:{"slot":"btn","theme":"blue","edge":""},on:{"click":_vm.onSubmit},slot:"btn"},[_vm._v("保存")])],1)],1)}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ var special_work_detail = (esExports);
// CONCATENATED MODULE: ./src/apps/special-work/detail.vue
function injectStyle (ssrContext) {
  __webpack_require__("fhhr")
}
var normalizeComponent = __webpack_require__("C7Lr")
/* script */


/* template */

/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-2796c04e"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  detail,
  special_work_detail,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)

/* harmony default export */ var apps_special_work_detail = __webpack_exports__["default"] = (Component.exports);


/***/ })

});